<template>
  <div id="app">
    <router-view></router-view>
    <van-tabbar route v-if="$route.meta.showFooter">
      <van-tabbar-item icon="home-o" :to="{ name: 'Home' }"
        >首页</van-tabbar-item
      >
      <van-tabbar-item :to="{ name: 'Fenlei' }" icon="search"
        >分类</van-tabbar-item
      >
      <van-tabbar-item :to="{ name: 'Cart' }" icon="friends-o"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item :to="{ name: 'Mine' }" icon="setting-o"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {};
  },
  created() {
    const token = localStorage.getItem("token");
    this.$store.commit("changetoken", token);
  },
  components: {},
};
</script>

<style></style>
